package com.citi.xylophone.phoneEmulator.view.listener;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import com.citi.xylophone.phoneEmulator.global.GlobalSwap;
import com.citi.xylophone.phoneEmulator.view.MainPanelview;

public class ButtonSendListener implements ActionListener {

	private MainPanelview mainPanelview;
	
	
	public ButtonSendListener(MainPanelview mainPanelview) {
		super();
		this.mainPanelview = mainPanelview;
	}



	public void actionPerformed(ActionEvent actionevent) {
		
		try {
			
			GlobalSwap.getCoreExecutor().inputValue(mainPanelview.getTextField1().getText());
			mainPanelview.getTextField1().setText("");
		
		} catch (Exception e) {			
			e.printStackTrace();
		}
	}
}
